home *** CD-ROM | disk | FTP | other *** search
/ Java Certification Exam Guide / McGrawwHill-JavaCertificationExamGuide.iso / pc / Web Links and Code / rev / chap10 / q6.java < prev   
Encoding:
Java Source  |  1997-05-08  |  263 b   |  12 lines

  1. class Str {
  2.    public static void main(String[] args) {
  3.       String s = new String("Hi");
  4.       String t;
  5.       t = s.toUpperCase();
  6.       if (s == t)
  7.          System.out.println("equals");
  8.       else
  9.          System.out.println("not equals");
  10.    }
  11. }
  12.